package itheima_06;

//JVM的默认处理方法
public class ExceptionDemo02 {
    public static void main(String[] args) {
        System.out.println("开始");
        method();
        System.out.println("结束");
    }

    public static void method() {
        int[] arr = new int[]{1, 2, 3};
        System.out.println(arr[3]);//ArrayIndexOutOfBoundsException 数组索引越界异常
    }
}
/*
程序结果：
开始
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 3
	at itheima_06.ExceptionDemo02.method(ExceptionDemo02.java:13)
	at itheima_06.ExceptionDemo02.main(ExceptionDemo02.java:7)

 */